package com.jeespring.elasticsearch.service.impl;

import com.github.pagehelper.PageHelper;
import com.jeespring.elasticsearch.dao.ItemDao;
import com.jeespring.elasticsearch.entity.Item;
import com.jeespring.elasticsearch.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description ItemServiceImpl
 * @author 张朝阳
 * @date 2021/9/17 18:47
 */
@Service
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemDao itemDao;

    public List<Item> select(Item item){
        PageHelper.startPage(1, 10);
        List<Item> itemList = itemDao.selectAll();
        return itemList;
    }
}
